/**
 * 功能描述 表单
 */

define(function (require, exports, module){
	var Form = require("form");
	var store =require("store");
	var activeUser = store.get("user");
	
	var formEvents = require("../handler/formEvents");
	
	var instance = {
		initComponent: function (params,widget){
			var signupform=new Form({
				parentNode:".J-signupform",
				model:{
					id:"signupform",
					defaultButton:false,
					layout : "3_1",
					items:[{
						name:"destination",
						label:"目的地",
						type:"select",
						key:"pkDestination",
						value:"name",
						url: "api/destination/query",
						validate:["required"],
						events : {
							"change" : function(){
								formEvents.formBlurEvents(widget);
							}
						}
					},{
						name:"startDate",
						label:"开始日期",
						type:"date",
						mode:"YYYY.MM.DD",
						validate:["required"],
						events : {
							"blur" : function(){
								formEvents.formBlurEvents(widget);
							}
						}
					},{
						name:"endDate",
						label:"结束日期",
						type:"date",
						mode:"YYYY.MM.DD",
						validate:["required"],
						events : {
							"blur" : function(){
								formEvents.formBlurEvents(widget);
							}
						}
					},{
						name : "groupUnit",
						label : "组团单位",
						readonly: true,
					},{
						name:"count",
						label:"报名人数",
						readonly: true,
					},{
						name:"servicePoint",
						type: "hidden",
					}]
				}
			});
			widget.set("signupform", signupform);
		}
	};
	module.exports = instance;
});